package com.demo.config;

import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @author zhiqiang
 */
@Configuration
public class RestTemplateConfig {

    @Bean
    @ConditionalOnClass(RestTemplate.class)
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }
}
